import sys

def plugin_deleter(index, status, sim_number, text, interfaces):
    if interfaces.has_key('org.freesmartphone.GSM.SIM'):
        interfaces['org.freesmartphone.GSM.SIM'].DeleteMessage(
            index,
            reply_handler=lambda:sys.stdout.write('message deleted'),
            error_handler=lambda x:sys.stdout.write('message deleted')
        )

